﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Karel.Pages
{
    /// <summary>
    /// Dictionary upload page
    /// </summary>
    public partial class Upload : System.Web.UI.Page
    {
        /// <summary>
        /// Content property
        /// </summary>
        protected string Content
        {
            get
            {
                object objValue = Page.Request.Params["Content"];
                if (objValue == null)
                    return string.Empty;
                return objValue.ToString();
            }
        }

        /// <summary>
        /// Filename property
        /// </summary>
        protected string Filename
        {
            get
            {
                object objValue = Page.Request.Params["Filename"];
                if (objValue == null)
                    return "slovnik.txt";
                return objValue.ToString();
            }
        }



        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected override void OnPreRender(EventArgs e)
        {
            // save the content and filename to session
            HttpContext.Current.Cache["Content"] = this.Content;
            HttpContext.Current.Cache["Filename"] = this.Filename;

            base.OnPreRender(e);
        }
    }
}
